﻿using PunchCard.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PunchCard.ViewModel
{
    class ViewModel
    {
        #region 建立单例 

        private static ViewModel uniqueInstance;

        private static readonly object locker = new object();

        public static ViewModel GetInstance()
        {
            if (uniqueInstance == null)
            {
                lock (locker)
                {
                    if (uniqueInstance == null)
                    {
                        uniqueInstance = new ViewModel();
                    }
                }
            }
            return uniqueInstance;
        }

        #endregion

        public ModelMainWindow m_Model_MainWindow = new ModelMainWindow();

    }
}
